<template>
    <div class="material">
        <p class="text-content ">请上传如下材料，您也可以扫描下方二维码，通过中欧FMBA服务号上传。</p>
        <div class="materials_img">
            <img src="../../../assets/images/wxcode.png" class="wxcode" alt="">
        </div>
        <ul class="materials_up">
            <li class="materials_up_item">
                <div class="materials_up_item_top">证件照<span class="red">*</span><span class="yol">（范本）</span>
                </div>
                <span class="materials_up_item_text">请上传一年内的证件照，而非生活照。</span>
                <div class="materials_up_item_botton">
                    <div class="materials_up_item_botton_file">
                        <span>选择文件</span>
                        <input type="file">
                    </div>
                    <span class="materials_up_item_text cursor" @click="onShowImg('passport')">passport.jpg</span>
                    <div class="but_box">
                        <button class="upload but">上传</button>
                        <button class="look but">查看</button>
                    </div>
                </div>
            </li>
            <li class="materials_up_item">
                <div class="materials_up_item_top">有效身份证件<span class="red">*</span><span class="yol">（范本）</span>
                </div>
                <span class="materials_up_item_text">请上传有效身份证件扫描件。</span>
                <div class="materials_up_item_botton">
                    <div class="materials_up_item_botton_file">
                        <span>选择文件</span>
                        <input type="file">
                    </div>
                    <span class="materials_up_item_text cursor" @click="onShowImg('id_card')">id_card.jpg</span>
                    <div class="but_box">
                        <button class="upload but">上传</button>
                        <button class="look but">查看</button>
                    </div>
                </div>
            </li>
            <li class="materials_up_item">
                <div class="materials_up_item_top">名片<span class="red">*</span><span class="yol">（范本）</span>
                </div>
                <span class="materials_up_item_text">请上传名片正反面扫描件。</span>
                <div class="materials_up_item_botton">
                    <div class="materials_up_item_botton_file">
                        <span>选择文件</span>
                        <input type="file">
                    </div>
                    <span class="materials_up_item_text cursor"
                        @click="onShowImg('business_card')">business_card.jpg</span>
                    <div class="but_box">
                        <button class="upload but">上传</button>
                        <button class="look but">查看</button>
                    </div>
                </div>
            </li>
            <li class="materials_up_item">
                <div class="materials_up_item_top">学历证书<span class="red">*</span><span class="yol">（范本）</span>
                </div>
                <p class="materials_up_item_text">□ 1)请将专科（如有）、本科及（或）研究生学历证书原件扫描上传</p>
                <p class="materials_up_item_text">□ 2)海外及港澳台学位无毕业证书勿需上传</p>
                <div class="materials_up_item_botton">
                    <div class="materials_up_item_botton_file">
                        <span>选择文件</span>
                        <input type="file">
                    </div>
                    <span class="materials_up_item_text cursor"
                        @click="onShowImg('certificate_Education')">certificate-Education.jpg</span>
                    <div class="but_box">
                        <button class="upload but">上传</button>
                        <button class="look but">查看</button>
                    </div>
                </div>
            </li>
            <li class="materials_up_item">
                <div class="materials_up_item_top">学位证书<span class="red">*</span><span class="yol">（范本）</span>
                </div>
                <span class="materials_up_item_text ">请将本科及（或）研究生学位证书原件扫描上传</span>
                <div class="materials_up_item_botton">
                    <div class="materials_up_item_botton_file">
                        <span>选择文件</span>
                        <input type="file">
                    </div>
                    <span class="materials_up_item_text cursor"
                        @click="onShowImg('certificate_degree')">certificate-degree.jpg</span>
                    <div class="but_box">
                        <button class="upload but">上传</button>
                        <button class="look but">查看</button>
                    </div>
                </div>
            </li>
            <li class="materials_up_item">
                <div class="materials_up_item_top">学位认证书<span class="red">*</span><span class="yol">（范本）</span>
                </div>
                <p class="materials_up_item_text">1)中国境内（不含港澳台地区）颁发的学位证书，</p>
                <p class="materials_up_item_text">请在学位网免费申请办理学位认证并上传认证报告。<span class="yol">学位网认证</span>
                </p>
                <p class="materials_up_item_text">2)境外或港、澳、台颁发的学位，请在教育部留学服务中心办理并上传认证书。</p>
                <p class="materials_up_item_text yol">教育部留学服务中心认证</p>
                <p class="materials_up_item_text">
                    友情提示：若认证网站提示需要人工审核或仍处于审核中，请先将进程截图上传系统，如果您已经填写完报名表中的其他内容，可以先提交报名表，认证完成后补交认证书/报告。</p>
                <div class="materials_up_item_botton">
                    <div class="materials_up_item_botton_file">
                        <span>选择文件</span>
                        <input type="file">
                    </div>
                    <span class="materials_up_item_text cursor" @click="onShowImg('certificate')">certificate.jpg</span>
                    <div class="but_box">
                        <button class="upload but">上传</button>
                        <button class="look but">查看</button>
                    </div>
                </div>
            </li>
            <li class="materials_up_item">
                <div class="materials_up_item_top">其他专业证书</div>
                <span class="materials_up_item_text">请上传其他如ACCA、CIMA、CFA等证书扫描件</span>
                <div class="materials_up_item_botton">
                    <div class="materials_up_item_botton_file">
                        <span>选择文件</span>
                        <input type="file">
                    </div>
                    <span class="materials_up_item_text cursor" @click="onShowImg('')">未选择文件</span>
                    <div class="but_box">
                        <button class="upload but">上传</button>
                        <button class="look but">查看</button>
                    </div>
                </div>
            </li>
            <li class="materials_up_item">
                <div class="materials_up_item_top">现工作单位组织结构图<span class="red">*</span><span class="yol">（范本）</span>
                </div>
                <span class="materials_up_item_text">请上传表明本人所在位置的单位组织结构图扫描件。</span>
                <div class="materials_up_item_botton">
                    <div class="materials_up_item_botton_file">
                        <span>选择文件</span>
                        <input type="file">
                    </div>
                    <span class="materials_up_item_text cursor"
                        @click="onShowImg('organization_chart')">organization_chart.jpg</span>
                    <div class="but_box">
                        <button class="upload but">上传</button>
                        <button class="look but">查看</button>
                    </div>
                </div>
            </li>
        </ul>

        <el-dialog v-model="dialogVisible" :before-close="handleClose">
            <img :src="urlList[key]">
        </el-dialog>

    </div>
</template>

<script>
export default {
    name: 'material',//材料上传
    props: {

    },
    data() {
        return {
            dialogVisible: false,
            src: '',
            urlList: {
                passport: require('../../../assets/images/passport.jpg'),
                id_card: require('../../../assets/images/id_card.jpg'),
                business_card: require('../../../assets/images/business_card.jpg'),
                certificate_Education: require('../../../assets/images/certificate-Education.jpg'),
                certificate_degree: require('../../../assets/images/certificate-degree.jpg'),
                certificate: require('../../../assets/images/certificate.jpg'),
                organization_chart: require('../../../assets/images/organization_chart.jpg'),
            }

        };
    },
    methods: {
        onShowImg(key) {
            this.key = key
            if (key) {

                this.dialogVisible = true
            }
        },
        handleClose() {
            this.dialogVisible = false
        }
    },
    components: {

    },
};
</script>

<style scoped lang="scss">
.material {
    ::v-deep .el-dialog__header {
        display: none;
    }

    ::v-deep .el-dialog__body {
        padding: 0;
        display: inline-block;
        width: auto;
        height: auto;
    }

    ::v-deep .el-overlay-dialog {
        position: relative;
        display: flex;
        justify-content: center;
    }

    ::v-deep .el-dialog {
        display: inline-block;
        width: auto;
        height: auto;

        img {
            max-width: 100%;
        }
    }

    .text-content {
        font-size: 16px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        line-height: 30px;
        margin-bottom: 45px;
        color: #5a5a5a;
    }

    .materials_img {
        width: 100%;
        text-align: center;

        .wxcode {
            width: 151px;
            height: 153px;
        }
    }

    .materials_up {
        padding-top: 49px;

        .materials_up_item {
            padding: 28px 16px;
            min-height: 144px;
            background: #F0F5FA;

            &:nth-child(2n) {
                background: #fafbfb;
            }

            .materials_up_item_top {
                font-size: 20px;
                font-family: Microsoft YaHei;
                font-weight: bold;
                color: #003963;
                margin-bottom: 21px;
            }

            .materials_up_item_text {
                line-height: 33px;
                font-size: 16px;
                font-family: Microsoft YaHei;
                font-weight: 400;
                color: #5A5A5A;
            }

            .cursor {
                cursor: pointer;
            }

            .red {
                color: #B9131A;
                margin: 0 5px;
            }

            .yol {
                color: #C6A67D;
                font-size: 16px;
                font-weight: 400;
            }

            .materials_up_item_botton {
                margin-top: 32px;
                display: flex;
                align-items: center;

                .materials_up_item_botton_file {
                    width: 110px;
                    height: 35px;
                    background: #FFFFFF;
                    border: 1px solid #003963;
                    border-radius: 5px;
                    overflow: hidden;
                    position: relative;

                    input {
                        opacity: 0;
                    }

                    span {
                        position: absolute;
                        top: 20%;
                        left: 20%;
                        cursor: pointer;
                    }
                }

                .materials_up_item_text {
                    flex: 1;
                    padding-left: 21px;
                }

                .but {
                    width: 65px;
                    height: 35px;
                    border: none;
                    border-radius: 5px;
                    color: #FFFFFF;
                    margin-right: 20px;
                    cursor: pointer;
                }

                .upload {
                    background: #C6A67D;
                }

                .look {
                    background: #88A4B9;
                }
            }
        }
    }

}

@media (max-width: 768px) {
    .material {
        .text-content {
            margin-bottom: 25px;
            font-size: 14px;
        }

        .materials_img {
            width: 100%;
            text-align: center;

            .wxcode {
                width: 101px;
                height: 103px;
            }
        }

        .materials_up {
            padding-top: 29px;

            .materials_up_item {
                padding: 28px 16px;
                min-height: 144px;
                background: #F0F5FA;

                &:nth-child(2n) {
                    background: #fafbfb;
                }

                .materials_up_item_top {
                    font-size: 16px;
                    font-family: Microsoft YaHei;
                    font-weight: bold;
                    color: #003963;
                    margin-bottom: 21px;
                }

                .materials_up_item_text {
                    line-height: 33px;
                    font-size: 14px;
                    font-family: Microsoft YaHei;
                    font-weight: 400;
                    color: #5A5A5A;
                }

                .red {
                    color: #B9131A;
                    margin: 0 5px;
                }

                .yol {
                    color: #C6A67D;
                    font-size: 14px;
                    font-weight: 400;
                }

                .materials_up_item_botton {
                    margin-top: 32px;
                    display: block;

                    .materials_up_item_botton_file {
                        width: 90px;
                        height: 25px;
                        background: #FFFFFF;
                        border: 1px solid #003963;
                        border-radius: 5px;
                        overflow: hidden;
                        position: relative;

                        input {
                            opacity: 0;
                        }

                        span {
                            position: absolute;
                            top: 10%;
                            left: 15%;
                            cursor: pointer;
                        }
                    }

                    .materials_up_item_text {
                        padding: 0;
                    }

                    .but {
                        width: 45px;
                        height: 28px;
                        border: none;
                        border-radius: 5px;
                        color: #FFFFFF;
                        margin-right: 20px;
                        cursor: pointer;
                    }

                    .upload {
                        background: #C6A67D;
                    }

                    .look {
                        background: #88A4B9;
                    }
                }
            }
        }
    }

}
</style>
